/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.nodes.factory;

import org.openide.nodes.Node;
import pl.edu.amu.wmi.kino.visualjavafx.nodes.objects.helpers.JavaFxNode;

/**
 * this class i only to get model object from the node - if something might need it.
 * @author psychollek
 */
public class ModelObjectRetriver {

    /**
     *
     * @param node
     * @return returns model object if node is JavafxNode, otherwise null
     */
    public static Object getModelObjectFromNode(Node node){
        if (node instanceof JavaFxNode){
            return ((JavaFxNode)node).getModelObject();
        }
        return null;
    }

}
